As a data volume and a requirement for data processing greatly increase, a load imposes a higher requirement on performance of an operating system, and an operating system with a structure of a microkernel and multikernel has become a trend in developing an operating system in future. Multikernel cooperative work can better isolate applications, improve a throughput rate of a system, and greatly improve performance of the system. Therefore, in the age of big data processing, various multikernel systems (or multiple operating systems) also gradually have drawn people's attention, and systems ranging from a conventional computer cluster system to a heterogeneous operating system that is popular nowadays are people's attempts in this aspect.
A main idea of a structure of multiple operating systems is that, by using this manner, different loads can be allocated to different operating system kernels for execution, so that a processing capability of the system can be improved and applications in different operating systems can be compatible. Compared with a conventional structure of multiple operating systems that is based on a computer cluster, a granularity of current multiple operating systems is degraded from an operating system to an operating system kernel. However, a design idea of separating calculation and resource sharing is still not changed. In other words, by using this design, all kernels are independent in terms of calculation, that is, all kernels independently process loads. However, in terms of use of resources, operating systems share resources of an entire structure of multiple operating systems, for example, input/output (I/O), and memory.
For memory that is a resource of a structure of multiple operating systems, existing structures of multiple operating systems mainly use a global memory sharing manner, that is, each central processing unit (CPU) runs a sub-operating system that is independent of each other; each sub-operating system accesses a global memory pool by using a Peripheral Component Interconnect Express (PCIe) bus or a network; and for the entire multiple operating systems, a global memory management service module that is responsible for coordinating a situation that sub-operating systems occupy global memory exists.
For a situation of sharing of global memory, policies used by various structures of multiple operating systems are different. A kind of typical design in the prior art is that: if the global memory is abstracted as a “memory stripe”, a global memory management service module system or module allocates, in a fixed sequence, from the front to the back, memory of the “memory stripe” in a basic unit of a quantity of blocks to kernel sections of sub-operating systems, that is, a sequence of occupying memory by the kernel sections of the sub-operating systems is arranged from the front to the back, and memory allocated to the kernel sections keeps unchanged in a running process of the entire multiple operating systems. General sections of the sub-operating systems obtain memory of the “memory stripe”, where the memory of the “memory stripe” is allocated from the back to the front by the global memory management service module system or module. A difference from allocation of memory to the kernel sections lies in that, allocation of memory to the general sections is dynamic allocation, and there is no sequence between pages that belong to each sub-operating system.
The foregoing conventional structure of the multiple operating systems that uses the global memory sharing manner has the following disadvantage. Each sub-operating system lacks a capability of actively sensing memory, and all global memory management work is processed by a global memory management service module, thereby causing complex encoding of global memory management and low execution efficiency, and also affecting performance of an entire system.